﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace EC2011_hk1_BT6_1041326_1041337_1041373_1041448.UserControls
{
    public partial class Menu : System.Web.UI.UserControl
    {
        private MenuItem _itemNavigation;
        protected void Page_Load(object sender, EventArgs e)
        {
            // Init state
            if (!Page.IsPostBack)
            {
                LoadMenuNavigation();
            }
        }

        /// <summary>
        /// LoadMenuNavigation method to output static menu
        /// </summary>
        protected void LoadMenuNavigation()
        {
            _itemNavigation = new MenuItem(Resources.Global.Navigation_Home);
            _itemNavigation.NavigateUrl = Resources.Global.Navigation_Home_Url;
            this.mNavigation.Items.Add(_itemNavigation);
            _itemNavigation = null;

            _itemNavigation = new MenuItem(Resources.Global.Navigation_Department);
            _itemNavigation.NavigateUrl = Resources.Global.Navigation_Department_Url;
            this.mNavigation.Items.Add(_itemNavigation);
            _itemNavigation = null;

            _itemNavigation = new MenuItem(Resources.Global.Navigation_Employee);
            _itemNavigation.NavigateUrl = Resources.Global.Navigation_Employee_Url;
            this.mNavigation.Items.Add(_itemNavigation);
            _itemNavigation = null;
        }
    }
}